// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 添加肥料 POST /fertilizer/insertFertilizer */
export async function insertFertilizerUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.insertFertilizerUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/fertilizer/insertFertilizer', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 肥料领取接口,可不用传入使用数量 POST /fertilizer/insertFertilizerAcquireRecord */
export async function insertFertilizerAcquireRecordUsingPOST(
  body: API.FertilizerAcquireRecord,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/fertilizer/insertFertilizerAcquireRecord', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加肥料使用记录 POST /fertilizer/insertFertilizerUsageRecord */
export async function insertFertilizerUsageRecordUsingPOST(
  body: API.FertilizerUsageRecords,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/fertilizer/insertFertilizerUsageRecord', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询肥料信息 GET /fertilizer/pageQueryFertilizer */
export async function pageQueryFertilizerUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.pageQueryFertilizerUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageFertilizer_>('/fertilizer/pageQueryFertilizer', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询当前培育人员可使用的肥料信息接口 GET /fertilizer/queryAvailableFertilizerList/${param0} */
export async function queryAvailableFertilizerListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAvailableFertilizerListUsingGETParams,
  options?: { [key: string]: any },
) {
  const { adminId: param0, ...queryParams } = params;
  return request<API.BaseResultListAvailableFertilizer_>(
    `/fertilizer/queryAvailableFertilizerList/${param0}`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** 根据id查询肥料 GET /fertilizer/queryFertilizer/${param0} */
export async function queryFertilizerUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryFertilizerUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultFertilizer_>(`/fertilizer/queryFertilizer/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 根据肥料领取记录查询本次所有的施肥记录 GET /fertilizer/queryUsageRecordByAcquireRecordId/${param0} */
export async function queryUsageRecordByAcquireRecordUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryUsageRecordByAcquireRecordUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResult>(`/fertilizer/queryUsageRecordByAcquireRecordId/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除肥料信息 POST /fertilizer/removeFertilizer */
export async function removeFertilizerUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.removeFertilizerUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/fertilizer/removeFertilizer', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 更新肥料信息 POST /fertilizer/updateFertilizer */
export async function updateFertilizerUsingPOST(
  body: API.Fertilizer,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/fertilizer/updateFertilizer', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
